home *** CD-ROM | disk | FTP | other *** search
- Path: news2.compulink.com!not-for-mail
- Newsgroups: comp.lang.c++
- From: pandora@cml.com (Chantal Marier)
- Subject: Help with calling batch files from Borland C++
- Content-Type: Text/Plain; charset=US-ASCII
- MIME-Version: 1.0
- X-Newsreader: WinVN 0.99.6
- X-Client-Port: 1070
- Message-ID: <ragnaroek1996Mar20.184656.11284@news2.compulink.com>
- X-Nntp-Posting-Host: slip4.cml.com
- Date: 20 Mar 96 23:46:56 GMT
-
- I am hoping that someone will be able to help me with a program that I have
- made. It almost works except for the fact that it only reads the batch file in
- question instead of calling the batch file. I am using Borland C++ and my
- program follows.
-
- #include <stdio.h>
-
- FILE *filePtr; /* Defines a file
- pointer */
-
- main()
- {
- filePtr = fopen("menu.bat", "r"); /* Opens file for
- reading */
- if (filePtr == NULL)
- { printf("Error opening file.\n"); } /* Displays error
- message if file does not
- open */
- else
- { fclose(filePtr); /* Closes file */
- printf("Program complete.\n"); }
- return 0;
- }
-
- If anyone out there knows how to do what I need to do, please, PLEASE let me
- know how to do this darn program. I am just learning how to program and your
- help would be greatly appreciated. :)
-
-